home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97b.txt
/
000080_icon-group-sender _Wed Sep 24 16:23:13 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by cheltenham.cs.arizona.edu (8.8.7/8.8.7) with SMTP id QAA08740
for <icon-group-addresses@cheltenham.CS.Arizona.EDU>; Wed, 24 Sep 1997 16:23:12 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA10180; Wed, 24 Sep 1997 16:23:12 -0700
To: icon-group@cs.arizona.edu
Date: Wed, 24 Sep 1997 22:30:42 GMT
From: (Pete M. Wilson)
Message-Id: <34299413.10548025@stripey.gamewood.net>
Organization: Danville Regional Medical Center
Sender: icon-group-request@cs.arizona.edu
References: <Stuart.Robinson-2309971812040001@asianstmg-221.anu.edu.au>
Subject: Re: another program with problems
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Stuart.Robinson@anu.edu.au (Stuart Robinson) wrote:
>Hello. I'm sorry to keep posting my programs to comp.lang.icon for
>editorial comments, but I have no local Icon support. Anyhow, I have a
>program that is producing output that I wouldn't expect, given the input.
>Here's the program:
>
... omitted ...
> while tab(upto("{") +1) do #move just past bracket (will
>fail if there is none)
> {
> wordfrag := move(1) #wordfrag = one character past bracket
>
... omitted ...
>It seems the lines with a single curly brackets are being treated as lines
>with "{O". What gives?
>
At a quick glance, I would say that on the lines with just open
braces, the assignment to wordfrag fails, since the move(1) fails,
since that is the end of the line. So wordfrag remains the last value
it was assigned, which is "0". If you change the last {0 to something
else, I bet the open brace lines will act like that instead. Try
either doing if (wordfrag := move(1)) to protect the following code.
Pete M. Wilson
Gamewood Data Systems Internet Service
wilsonpm@gamewood.net